Skip to main content

Full text of "Circuits"

See other formats

InterActive 4 Dumb Terminal 

Make] Projects 

hhiiilH ho/ 1 !/ tuMaal/ chare r\icf*f\\tat* 

build, hack, tweak, share, discover,- 

InterActive 4 Dumb Terminal 

Written By: Steven Robert Cypherd 


Basic Stamp 2(1) 


Here we are making a dumb terminal out of an old DMC 161 17A 1x16 LCD display. The first 
thing to do is to get a serial interface for the display. I am using a SparkFun SerLCD for this. 
The 161 17A only has 14 connectors and that is fine. The 15 & 16 connections on the SerLCD 
are for the back light LEDs. Just carefully cut the header and remove those connectors. 
Install the SerLCD on to the 161 17A. Connect Power, Ground and Rx to your processor port. 
Serial communications parameters are vanilla 9600 baud, 8 bits even or true, 1 Start bit, 1 
Stop bit, no parity. 

I am just using fragments of my code for this article. It is the same code I used for the Serial 
EEPROM article. I just changed the output drivers to handle the 161 17A display. 

The code text is on Let's Make Robots and Instructables . 

If you want back lights you will have to remove the mirror backing on the 161 17A. On mine 
the foil was on another piece of plastic. I removed all of it. The lights can be anything. 
Connect them plus voltage to 15 and ground on 16. 

I do not remember when I got my 161 17A. It was one of the first LCD displays available for 
processor boards way back in the mid 90's. No one did much with it because of its horrible 

© Make Projects Page 1 of 3 

InterActive 4 Dumb Terminal 

tedious parallel interface. The serial interfaces now make it great for a dumb terminal 
attached to a processor board like the Basic Stamp 2. You still have to baby this display and 
the processor board helps. Power glitches and static discharge send the 161 17A into 
uncontrollable states that only a correct series of commands can fix. The Parallax BASIC 
should be easy to translate into other systems. 

The 16117A controller is for multi-line displays. The 16 -display is really two 8-byte lines in 
the display's memory; 0-7 for the first line and 64-71 for the second line. In my program to 
make the cursor position you add the control character 128 to it. That tells SerLCD that it is 
a cursor position. The memory is a mess. See the manual. 

Having the SerLCD gives you all those pins to do other things with. Run switches for user 
feedback. Run things for the user interface. Make a bigger interactive thing. The display 
keeps the users informed. And the 161 17A looks almost normal thanks to the other 
processor board. Just to send a long string to the display you need a processor. Send first 8 
letters then set the cursor position and print the rest of the string to the display. That is what 
my interface does. 

Every processor board supports network serial communications on most of their pins. 
Networks must have the grounds connected or they will not understand each other. Minimum 
is Rx and Ground. Long network cables should be shielded twisted-pair cables. Pull-up 
resistors is all you need. About 47K. See my InterActive articles. I have not got the network 
stuff done yet, so no code file this time. I wish I had friends to share this with. I am a very 
lonely geek in LA. 

© Make Projects Page 2 of 3 

InterActive 4 Dumb Terminal 

Step 1 — InterActive 4 Dumb Terminal 

InterActivft 4 Dumb Terminal 

16 IS &TC6B5M E ft* Jt* V* Vi Vi 

Bfc*k light* Q V+ L4 13 13 M | C9 p 6 ft 4 3 2 

The Serial Interface Train SparkFun.cnrn. 

Uw *600 baud ctod or true, 1 Start bit* 1 Stop bit, no 

Parity. Maybe rc-programmcd throuRh the ICSP part. 

See- the mraul. 

InterActive 4 

tnterActiv« Thini 1 . 

Rip Hl^nih If Emiiul f jn h? pjrt pf }»hii ipb<T.Jrtiv* lh>njt With. ■!* d'y+pijifi 
hplhnius jnrEli^hhi ynpcin ptipEnil Ji»vlhiii[{. Vim-uw lh,- inirntjirfflri'vrfir 
III- ranrwyl j raur ilumh- t-nini njl hi ihf ifM nf jf ni^r in^gr^fJ-»C fllimfr 

lpil?r*(tiif o TTiSna 

■ II'jICiu-.-,. Mudr* ft >.^Lli ii|f* 
4 1 i;.-.lilm bifiMDi^lrtn 

Networks n»* jiSdrwHiij, Vpu Hnd the ID flrM, If lh* ID is for lli*1 Jwiretfun 
did drrin open* j wri jl opwisrtlwi Is (h* n»*l*r, Th* ratf rf flu ih%ir*!i mil. 
Fjch rr«?^xir iKMrd %hwjld IwvtJi unique ID in tin int*F*rtly* thing. 
Simple de*iws like ttieSvrLCDib no* hjv« ^n jrfdrMV Vwiuw jpwlhw 

y:< -.. -M-r ftiri I ■ rurt-Wri*! CU lhc^,r drvUr-,. 
E H li fetfRtfl *n J I- >:li ! MM J j'url 

ShU Dwvkw "■«- t ik MnpHtoMdii R» I, Is i,- plwdnrad 

Eji.Ii Jr-kin- ljh Iijvl- its iiyih |>ohTi, fru( Ihr tiniuiiil* mint Ik- iimii5^lIliJ 

Inter Active 4 A tdi 17A fix 

die IfeLlJATuAiimiv pcoUead to h*« it ay fis lutfiiii Lili duptiy. 

ADauTvn.j.^ir. IX--. 1111^ ( !.. : i:,.i - Riinljmi: fat 

(Liter c^-1 ■ it nUM .mmiiiI Ik 

aUlK J tni;** itrdcdj ■ ,.!> El* jpi*;,- . tt 

IP Cap} ■ >6 1MB MnLvci Lhi i:x 

WW. C»CJ ■ 1 TO It MH fc* *¥*fi 

JttfcU? mpi, It. [Pf p^t] 

JBIUtR- Cipi. 44, [DipniDiJ HA » 111: H 41, ■ I lan», I 
r*V5I 1 .■"*[.■ 1I:ti i 

WJtlB 1 

inODTtapL. i< , II^pCadLf 

9EP*nrc»pL. ■vBw3**i , j 

.-!:■? .iy Do 
/CXjctvi CIC 

;i ■ tlmj ^iipl.y 

jane 1 

iEHHTT EwpL . iH . I ■Dm' I 

E^i Siovn R.-£'jt>^tJ 

• Serial LCD interface 

• Dumb Terminal 

• 16117A FIX 

Step 2 

InterActive 4 

161 17A Displaying a Long String 

Because of the 16117A controller being for multi-line displays the addressing is a mess. 

Hello DMC16117A 

- 764 - 71 

MyStr is 17 bytes, 
one. Insert a zero. 
cursor to 64 . Move 
Add 0. Print It. 
Hello DM0C16117A 

The 1 line 16117A is two 8 byte lines 64 
bytes from the first line. 

I move Hi 8 up 

Print It. Set 

Hi 8 to front. 


Print Hello DM 

Print C16117A 


Display Hello DMC16117A 

IF DSpStr = THEN JlODspStr 

DEBUG DEC tmpl . «. ■, STE myStr, CR 

SEROUT Dapl, 84, [DspCmdl] 

SEROUT Dapl, 84. [Dspcl*ar] 


FOR tmp2 = TO l5 r Go through string 

IF DfiyStr (tlBp2) = AND tap 2 < 3 THEN 

SEROUT Dspl, 84, [STR BiyStr] 


IF trap2 = 8 TBEN /start second line 
trap4 =16 

tmpi = ib By Steven R Cypherd 


mystr{tmp4) = mystr<tmp3> 

tmp4 = trap4 - 1 /Mjovt Hi e Up one 

tmp3 = trap3 - 1 

LOOP UHTIL (tllip3 < 8) 
raystr <tmp2> = 
SEROUT Dspl, B4, [STR mystr] 

tmp3 =64+128 'Set Address to Line : 

SEROUT Dspl, B4, [DspCffldll 

SEROUT Dspl, B4, [tmp3] 


t1tlp3 = 

Lltlp4 = tmp2 + 1 


: mystr{tmp4) 

■ i /Kove Hi a to front 

nnystr (tmp3) 
tuip3 = tmp3 
tmp4 = trap4 

LOOP UNTIL (tnp3 > 7) 

raystr(8) = 

SEROUT Dspl, B4, [STR WiyStr] 
NEXT 'Go through string 


DEBUG DEC, ■.. n , STR myStr, CR 
DapStr = 

NEXT' Read in strings 
HIGH epca "Set chip select High - close command 
epAddr = Diystrs * 16 /Reset Address 
goto cmdDisplay 

Display a long String 


This document was last generated on 201 3-01 -06 06:29:02 AM. 

© Make Projects 

Page 3 of 3